package com.gas.project.gas.practice.domain;

import java.math.BigDecimal;

import com.gas.framework.aspectj.lang.annotation.Excel;
import com.gas.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 社会实践对象 gas_practice
 *
 * @author xyl
 * @date 2022-04-04
 */
public class Practice extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    private Long practiceId;

    /**
     * 学生编号
     */
    @Excel(name = "学生编号")
    private String studentNumber;

    /**
     * 在校实践成绩
     */
    @Excel(name = "在校实践成绩")
    private BigDecimal schoolScore;

    /**
     * 假期实践成绩
     */
    @Excel(name = "假期实践成绩")
    private BigDecimal vacationScore;

    /**
     * 毕设成绩
     */
    @Excel(name = "毕设成绩")
    private BigDecimal gpScore;

    /**
     * 是否签第三方
     */
    @Excel(name = "是否签第三方")
    private String signContract;

    private String aduitStatus;

    private String myStudent;

    private String studentName;

    private String teacherName;

    private String teacherNumber;

    private boolean reply;

    public boolean isReply() {
        return reply;
    }

    public void setReply(boolean reply) {
        this.reply = reply;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public String getTeacherNumber() {
        return teacherNumber;
    }

    public void setTeacherNumber(String teacherNumber) {
        this.teacherNumber = teacherNumber;
    }

    public String getStudentName() {
        return studentName;
    }

    public void setStudentName(String studentName) {
        this.studentName = studentName;
    }

    public String getMyStudent() {
        return myStudent;
    }

    public void setMyStudent(String myStudent) {
        this.myStudent = myStudent;
    }

    public void setPracticeId(Long practiceId) {
        this.practiceId = practiceId;
    }

    public Long getPracticeId() {
        return practiceId;
    }

    public void setStudentNumber(String studentNumber) {
        this.studentNumber = studentNumber;
    }

    public String getStudentNumber() {
        return studentNumber;
    }

    public void setSchoolScore(BigDecimal schoolScore) {
        this.schoolScore = schoolScore;
    }

    public BigDecimal getSchoolScore() {
        return schoolScore;
    }

    public void setVacationScore(BigDecimal vacationScore) {
        this.vacationScore = vacationScore;
    }

    public BigDecimal getVacationScore() {
        return vacationScore;
    }

    public void setGpScore(BigDecimal gpScore) {
        this.gpScore = gpScore;
    }

    public BigDecimal getGpScore() {
        return gpScore;
    }

    public void setSignContract(String signContract) {
        this.signContract = signContract;
    }

    public String getSignContract() {
        return signContract;
    }

    public void setAduitStatus(String aduitStatus) {
        this.aduitStatus = aduitStatus;
    }

    public String getAduitStatus() {
        return aduitStatus;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("practiceId", getPracticeId())
                .append("studentNumber", getStudentNumber())
                .append("schoolScore", getSchoolScore())
                .append("vacationScore", getVacationScore())
                .append("gpScore", getGpScore())
                .append("signContract", getSignContract())
                .append("aduitStatus", getAduitStatus())
                .append("createTime", getCreateTime())
                .append("createBy", getCreateBy())
                .append("updateTime", getUpdateTime())
                .append("updateBy", getUpdateBy())
                .append("remark", getRemark())
                .toString();
    }

    public String check(Practice practice) {
        if (StringUtils.isBlank(practice.getStudentNumber())) {
            return "学生学号不能为空！";
        }
        if (StringUtils.isBlank(practice.getSignContract())) {
            return "是否签第三方不能为空！";
        }
        if (practice.getSchoolScore() == null) {
            return "在校实践得分不能为空！";
        }
        if (practice.getVacationScore() == null) {
            return "假期实践得分不能为空！";
        }
        if (practice.getGpScore() == null) {
            return "毕设成绩不能为空！";
        }
        return null;
    }
}
